package com.yiren.manager.utils;

/**
 * 
 * HTTPStatusCode
 * 
 * @author 冯胜德
 *
 */
public enum HTTPStatusCode {
	
	Success(200), 
	Error(400),
	NoPermission(401);

	private int code;

	private HTTPStatusCode(int code) {
		this.code = code;
	}

	public static HTTPStatusCode valueof(int code) {
		switch (code) {
		case 200:
			return Success;
		default:
			return null;
		}
	}

	public int value() {
		return this.code;
	}
}
